# 100个小星星
import turtle
import random

turtle.delay(0)
turtle.bgcolor("black")
t = turtle.Pen()

count = eval(turtle.textinput("小星星", "你想画多少个小星星?"))
pos100 = []
colors = ["red", "blue", "green", "yellow"]

for i in range(count):
    x = random.randrange(-300, 300)
    y = random.randrange(-300, 300)
    pos100.append((x,y))

print(pos100)

for i in range(count):
    # goto pos
    t.up()
    t.goto(pos100[i])
    t.pencolor(colors[i%4])
    t.down()
    # draw pentagram
    for x in range(5):
        t.forward(36)
        t.right(144)

turtle.done()